home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / mcsecure.zip / MCSECURE.INC < prev    next >
Text File  |  1996-05-16  |  5KB  |  102 lines

  1. Attribute VB_Name = "SECURITY_inc"
  2. ' definition for encrypt/decrypt
  3. Public Const ENCRYPT_LEVEL_0 = 0
  4. Public Const ENCRYPT_LEVEL_1 = 1
  5. Public Const ENCRYPT_LEVEL_2 = 2
  6. Public Const ENCRYPT_LEVEL_3 = 3
  7. Public Const ENCRYPT_LEVEL_4 = 4
  8.  
  9. ' definition for FILECRC32
  10. Public Const OPEN_MODE_BINARY = 0
  11. Public Const OPEN_MODE_TEXT = 1
  12.  
  13. #If Win16 Then
  14.  
  15. ' structure for serialization
  16. Type tagSERIALDATA
  17.    Description1      As String * 50       'serialization description 1
  18.    Description2      As String * 50       'serialization description 2
  19.    Number            As Long              'serialization number
  20.    Dummy             As String * 50       'reserved for future use
  21. End Type
  22.  
  23. ' structure for media-id
  24. Type tagDOSMEDIAID
  25.    InfoLevel            As Integer
  26.    SerialNumber         As Long
  27.    VolLabel             As String * 11
  28.    FileSysType          As String * 8
  29. End Type
  30.  
  31. #Else
  32.  
  33. ' structure for serialization
  34. Type tagSERIALDATA
  35.    Description1      As String * 52       'serialization description 1
  36.    Description2      As String * 52       'serialization description 2
  37.    Number            As Long              'serialization number
  38.    Dummy             As String * 52       'reserved for future use
  39. End Type
  40.  
  41. ' structure for media-id
  42. Type tagDOSMEDIAID
  43.    InfoLevel            As String * 2     'use cCVI for integer conversion
  44.    SerialNumber         As String * 4     'use cCVL for long conversion
  45.    VolLabel             As String * 11
  46.    FileSysType          As String * 8
  47. End Type
  48.  
  49. #End If
  50.  
  51. #If Win16 Then
  52.  
  53. Declare Function cGetVersion Lib "mcsec-16.dll" () As Single
  54.  
  55. Declare Function cIsSerial Lib "mcsec-16.dll" (ByVal file1 As String) As Integer
  56. Declare Function cSerialGet Lib "mcsec-16.dll" (ByVal file As String, SERIALDATA As tagSERIALDATA) As Integer
  57. Declare Function cSerialInc Lib "mcsec-16.dll" (ByVal file As String, ByVal Increment As Long) As Integer
  58. Declare Function cSerialPut Lib "mcsec-16.dll" (ByVal file As String, SERIALDATA As tagSERIALDATA) As Integer
  59. Declare Function cSerialRmv Lib "mcsec-16.dll" (ByVal file As String) As Integer
  60.  
  61. Declare Function cHashMD5 Lib "mcsec-16.dll" (Text As String) As String
  62. Declare Function cRegistrationKey Lib "mcsec-16.dll" (ByVal RegString As String, ByVal RegCode As Long) As Long
  63.  
  64. Declare Function cFileCRC32 Lib "mcsec-16.dll" (ByVal lpFilename As String, ByVal Mode As Integer) As Long
  65. Declare Function cStringCRC32 Lib "mcsec-16.dll" (Txt As String) As Long
  66.  
  67. Declare Function cDecrypt Lib "mcsec-16.dll" (Txt As String, password As String, ByVal level As Integer) As String
  68. Declare Function cEncrypt Lib "mcsec-16.dll" (Txt As String, password As String, ByVal level As Integer) As String
  69.  
  70. Declare Function cFileDecrypt Lib "mcsec-16.dll" (ByVal file1 As String, ByVal file2 As String, password As String, ByVal level As Integer) As Long
  71. Declare Function cFileEncrypt Lib "mcsec-16.dll" (ByVal file1 As String, ByVal file2 As String, password As String, ByVal level As Integer) As Long
  72.  
  73. Declare Function cDOSGetMediaID Lib "mcsec-16.dll" (ByVal nDrive As String, DOSMEDIAID As tagDOSMEDIAID) As Integer
  74. Declare Function cDOSSetMediaID Lib "mcsec-16.dll" (ByVal nDrive As String, DOSMEDIAID As tagDOSMEDIAID) As Integer
  75.  
  76. #Else
  77.  
  78. Declare Function cGetVersion Lib "mcsec-32.dll" () As Single
  79.  
  80. Declare Function cIsSerial Lib "mcsec-32.dll" (ByVal file1 As String) As Integer
  81. Declare Function cSerialGet Lib "mcsec-32.dll" (ByVal file As String, SERIALDATA As tagSERIALDATA) As Integer
  82. Declare Function cSerialInc Lib "mcsec-32.dll" (ByVal file As String, ByVal Increment As Long) As Integer
  83. Declare Function cSerialPut Lib "mcsec-32.dll" (ByVal file As String, SERIALDATA As tagSERIALDATA) As Integer
  84. Declare Function cSerialRmv Lib "mcsec-32.dll" (ByVal file As String) As Integer
  85.  
  86. Declare Function cHashMD5 Lib "mcsec-32.dll" (Text As String) As String
  87. Declare Function cRegistrationKey Lib "mcsec-32.dll" (ByVal RegString As String, ByVal RegCode As Long) As Long
  88.  
  89. Declare Function cFileCRC32 Lib "mcsec-32.dll" (ByVal lpFilename As String, ByVal Mode As Integer) As Long
  90. Declare Function cStringCRC32 Lib "mcsec-32.dll" (Txt As String) As Long
  91.  
  92. Declare Function cDecrypt Lib "mcsec-32.dll" (Txt As String, password As String, ByVal level As Integer) As String
  93. Declare Function cEncrypt Lib "mcsec-32.dll" (Txt As String, password As String, ByVal level As Integer) As String
  94.  
  95. Declare Function cFileDecrypt Lib "mcsec-32.dll" (ByVal file1 As String, ByVal file2 As String, password As String, ByVal level As Integer) As Long
  96. Declare Function cFileEncrypt Lib "mcsec-32.dll" (ByVal file1 As String, ByVal file2 As String, password As String, ByVal level As Integer) As Long
  97.  
  98. Declare Function cDOSGetMediaID Lib "mcsec-32.dll" (ByVal nDrive As String, DOSMEDIAID As tagDOSMEDIAID) As Integer
  99. Declare Function cDOSSetMediaID Lib "mcsec-32.dll" (ByVal nDrive As String, DOSMEDIAID As tagDOSMEDIAID) As Integer
  100.  
  101. #End If
  102.